import React from 'react'
import { Row, Col } from 'antd'
import {HashRouter,Route,Link,Switch,BrowserRouter} from 'react-router-dom'
function Thing(props){
    return <div>好事多磨难</div>
}
class Thinga extends React.Component
{
    constructor(){
        super()
    }
    render(){
        return <div>心中需要有梦想 <Link to={{pathname:"/",query:{liu:"勇"}}}>跳</Link> </div>
    }
}
function Thingb(props){
    return <div>前路才不会迷茫</div>
}
function Thingc(props){
    return <div>如果不选择 坚持 你将一无所有</div>
}
class Classic extends React.Component
{
    constructor(){
        super()
    }
    render(){
        return (
            <div>
               <BrowserRouter>
               <Row>
                    <Col span={6}>
                        <Link to="/">a</Link>
                    </Col>
                    <Col span={6}>
                        <Link to="/aa">b</Link>
                    </Col>
                    <Col span={6}>
                        <Link to="/bb">c</Link>
                    </Col>
                    <Col span={6}>
                        <Link to="/cc">d</Link>
                    </Col>
                </Row>
                <Row>
                    <Col span={24}>
                        <Switch>
                            <Route exact path="/" component={Thing} />
                            <Route  path="/aa" component={Thinga} />
                            <Route  path="/bb" component={Thingb} />
                            <Route  path="/cc" component={Thingc} />
                        </Switch>
                    </Col>
                </Row>
               
               </BrowserRouter>

            </div>
        )
    }
}
export default Classic